﻿
using System ;
using System.Windows.Forms ;

using MskEdit.Dxf.Model ;


namespace MskEdit.Dxf.Frontend
{

    public class DxfEntityTreeNode : TreeNode 
    {
        private DxfEntity dxfEntitiy_ ;
        
        
        public static DxfEntityTreeNode TryFrom( DxfEntity dxfEntitiy, DxfEntityTreeNode fallbackValue ) {
        
            if ( dxfEntitiy == null )
                return fallbackValue ;
                
            return new DxfEntityTreeNode( dxfEntitiy ) ;
        }
        
        
        public DxfEntityTreeNode( DxfEntity dxfEntitiy ) {
        
            dxfEntitiy_ = dxfEntitiy ;
            this.Text = dxfEntitiy.Caption ;
        }
    }
}
